<?php
class IndexAction extends Action{

	private $userM;

	public function _initialize(){
		$this->userM = D('User');

	}

	public function index(){
		//$defineds = get_defined_constants(true);echo "<pre>";print_r($defineds['user']);//得到所有常量

		$UserId = $this->UserId;
		$UserObject = $this->userM->getObject($UserId);
		//print_r($UserObject);
		$logoutUrl = U('User-UserLogin/logout');//登出接口
		$this->assign('UserName',$UserObject['UserName']);
		$this->assign('logoutUrl',$logoutUrl);
		$this->display();
	}

	public function info(){
		$this->ajaxReturn(array('ss'=>'信息'));
	}

}
?>
